package org.jeecg.modules.demo.jxcx.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.jxcx.Utils.R;
import org.jeecg.modules.demo.jxcx.mapper.JxcInventoryMapper;
import org.jeecg.modules.demo.jxcx.po.JxcInventory;
import org.jeecg.modules.demo.jxcx.service.JxcInventoryService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Administrator
* @description 针对表【jxc_inventory】的数据库操作Service实现
* @createDate 2024-09-12 18:20:45
*/
@Service
public class JxcInventoryServiceImpl extends ServiceImpl<JxcInventoryMapper, JxcInventory>
implements JxcInventoryService{

    @Override
    public List<JxcInventory> getByCompanyId(String companyId) {
        return baseMapper.getByCompanyId(companyId);
    }

    @Override
    public R add(JxcInventory jxcInventory) {
        return new R().ok(save(jxcInventory));
    }

    @Override
    public JxcInventory getBymodel(String model, String companyId) {
        return baseMapper.getBymodel(model, companyId);
    }
}
